//    Copyright (C) Kherty.  All rights reserved.
using System;
using System.Runtime.InteropServices;
using OpenLS.UI.Interop;

namespace OpenLS.UI
{
    /*
    class FilterCollection: IDisposable
    {
        internal static FilterCollection Parse(string filter)
        {
            string[] items = filter.Split('|');
            FilterCollection result = new FilterCollection();
          //  result.array= new NativeMethods.COMDLG_FILTERSPECUnsafe[items.Length / 2];
            result.flatNames = items;
          //  for (int i = 0; i < items.Length - 1; i += 2)
           // {
            //    NativeMethods.COMDLG_FILTERSPECUnsafe spec = new NativeMethods.COMDLG_FILTERSPECUnsafe();
            //    spec.pszName = items[i]; //\\Marshal.StringToCoTaskMemUni(items[i + 0]);
            //    spec.pszSpec = items[i + 1];//\\ Marshal.StringToCoTaskMemUni(items[i + 1]);
             //   result.array[i / 2] = spec;
           // }
            //return result;

        }
       // internal NativeMethods.COMDLG_FILTERSPECUnsafe[] array;


        #region IDisposable Members

        public void Dispose()
        {
            foreach (NativeMethods.COMDLG_FILTERSPECUnsafe u in array)
            {
               // Marshal.FreeCoTaskMem(u.pszName);
               // Marshal.FreeCoTaskMem(u.pszSpec);
            }
        }

        #endregion

        internal string[] flatNames;
    }
     * */
}
